package com.ucode.model.cgms.form;

import com.ucode.tool.validator.IDCard;
import com.ucode.tool.validator.Mobile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * 陪玩用户Form
 * @Author: liliang
 * @Date: 2025/5/9 17:03
 * @Version: 1.0
 */
@Schema(description = "陪玩俱乐部社区系统 - 陪玩用户Form")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class CgmsCompanionUserApplyForm {
    /**
     * 1-管理员 2-普通陪玩 3-虚拟陪玩
     */
    private Integer type;

    /**
     * 担保人ID
     */
    @Schema(description = "担保人ID", requiredMode = Schema.RequiredMode.AUTO)
    private Long guarantorId;

    /**
     * 昵称
     */
    @Schema(description = "昵称", example = "张三", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "昵称不能为空")
    @Size(max = 50, message = "昵称不能超过50个字符")
    private String nickName;

    /**
     * 真实姓名
     */
    @Schema(description = "真实姓名", example = "张三", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "真实姓名不能为空")
    @Size(max = 50, message = "真实姓名不能超过50个字符")
    private String realName;

    /**
     * 头像
     */
    @Schema(description = "头像URL", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "头像不能为空")
    @Size(max = 255, message = "头像不能超过 255 个字符")
    private String avatar;

    ///**
    // * 用户性别
    // *
    // * 枚举类 {@link com.ucode.tool.base.enums.SexEnum}
    // */
    //@Schema(description = "用户性别，参考枚举SexEnum", requiredMode = Schema.RequiredMode.REQUIRED)
    //@NotNull(message = "用户性别不能为空")
    //@InEnum(value= SexEnum.class, message = "用户性别值错误")
    //private Integer gender;

    ///**
    // * 出生日期
    // */
    //@Schema(description = "出生日期", requiredMode = Schema.RequiredMode.REQUIRED)
    //@NotNull(message = "出生日期不能为空")
    //private LocalDate birthday;

    /**
     * 手机号
     */
    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "手机号不能为空")
    @Mobile
    private String phone;

    /**
     * 微信号
     */
    @Schema(description = "微信号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "微信号不能为空")
    @Size(max = 50, message = "微信号不能超过 50 个字符")
    private String wechatId;

    /**
     * 支付宝账号
     */
    @Schema(description = "支付宝账号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "支付宝账号不能为空")
    @Size(max = 50, message = "支付宝账号不能超过 50 个字符")
    private String alipayAccount;

    /**
     * 身份证号码
     */
    @Schema(description = "身份证号码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "身份证号码不能为空")
    @IDCard
    private String idCardNumber;

    /**
     * 身份证正面
     */
    @Schema(description = "身份证正面图片URL", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "身份证正面图片不能为空")
    @Size(max = 255, message = "身份证正面图片不能超过 255 个字符")
    private String idCardFrontUrl;

    /**
     * 身份证反面
     */
    @Schema(description = "身份证反面图片URL", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "身份证反面图片不能为空")
    @Size(max = 255, message = "身份证反面图片不能超过 255 个字符")
    private String idCardBackUrl;

    /**
     * 押金金额（单位：元）
     */
    @Schema(description = "押金金额（单位：元）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "押金金额不能为空")
    @DecimalMin(value = "0",message = "押金金额最小值为 0")
    @Digits(integer = 11,fraction = 2,message = "押金金额格式不正确")
    private BigDecimal depositAmount;

    /**
     * 技能图片列表
     */
    @Schema(description = "技能图片URL列表", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 6, message = "技能图片列表不能超过 6 个")
    private List<String> skillPicList;

    /**
     * 装饰图片列表
     */
    @Schema(description = "装饰图片URL列表", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 6, message = "装饰图片列表不能超过 6 个")
    private List<String> decorativePicList;

    /**
     * 标签列表
     */
    @Schema(description = "标签列表", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 9, message = "标签列表不能超过 9 个")
    private Set<String> tags;

    /**
     * 个人介绍
     */
    @Schema(description = "个人介绍", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "个人介绍不能为空")
    @Size(max = 255, message = "个人介绍不能超过 255 个字符")
    private String remark;

    /**
     * 单价 金额
     */
    @Schema(description = "单价金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "单价金额不能为空")
    @DecimalMin(value = "0",message = "单价金额最小值为 0")
    @Digits(integer = 11,fraction = 2,message = "单价金额格式不正确")
    private BigDecimal membershipFeePerUnit;

}
